﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using EpsiRisk.MoteurJeu;

namespace EpsiRisk.AffichageJeu
{
    public class ClassZoneContextuelle : ClassZone
    {
        /// <summary>
        /// sprite bordure..
        /// </summary>
        static Texture2D SpriteBorderMilieu;

        public ClassZoneContextuelle()
        {
            backcolor = Color.BurlyWood;
            position = new Vector2(100, 515);
            width = 600;
            height = 85;
        }

        internal override void initialiser(ContentManager content)
        {
            SpriteBorderMilieu = content.Load<Texture2D>("Sprites/SpriteBorderMilieu");
        }

        internal override void Draw(SpriteBatch spriteBatch)
        {
            base.Draw(spriteBatch);
            spriteBatch.Begin();
            spriteBatch.Draw(SpriteBorderMilieu, position, null, Color.White, 0, new Vector2(0, 0), 0.5f, SpriteEffects.None, 0);
            spriteBatch.Draw(SpriteBorderMilieu, position+new Vector2(300,0), null, Color.White, 0, new Vector2(0, 0), 0.5f, SpriteEffects.None, 0);       
            spriteBatch.End();
        }

        internal override void clicXY(int x, int y)
        {
            if (ClassEtatPartie.joueurCourant() == null || ClassEtatPartie.joueurCourant().estHumain)
            {
                base.clicXY(x, y);
            }
        }

    }
}
